import axios from '../../utils/axios'

// 课程列表
export const teachCourseList = (params?: { page: Number, title: string,status: (Number | string),permission:(Number | string), id: Number }, method?: string) => {
    return axios({
        url: '/teach/course/list',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 获取视频上传密码
export const teachCommonStsToken2 = (params?: {  }, method?: string) => {
    return axios({
        url: '/teach/common/sts/token2',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 创建课程
export const teachCourseCreate = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/create',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 更新课程
export const teachCourseUpdate = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/update',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 删除课程
export const teachCourseDeleted = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/deleted',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 章节列表
export const coursecategoryList = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/category/list',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 创建课程或章节
export const courseCategoryCreate = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/category/create',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 编辑课程或章节
export const courseCategoryUpdate = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/category/update',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 删除课程章节
export const courseCategoryDeleted = (params: {  }, method?: string) => {
    return axios({
        url: '/teach/course/category/deleted',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

// 所有课程或章节
export const courseCategorySelect = (params: {id: number}, method?: string) => {
    return axios({
        url: '/teach/course/category/select',
        method: method || 'get',
        data: {
            ...params
        }
    })
}

